Thank you for being a member of the Kids "R" the Future" Community.
How Will Your Family Be in 2009?
Nonna Joann Bruso of Baby Bites discusses sneaking healthful ingredients into children's foods. She also gives two recipes that sound delicious, and one has a very surprising ingredient!
If you've ever organized meal deliveries for a friend who has just had a baby or for a sick family member, you know how confusing it can be. You don't want the recipient to receive 15 lasagnas or to miss a meal! Now, a new website makes this all easy. After registering, you provide date ranges, food allergies, times for food delivery and more. You then simply invite people to participate.
These resolutions are terrific for teaching your children about energy consumption and about how small changes in our lifestyle can make big improvements in the environment.
5. How Will Your Family Be in 2009?
As a unifying way to support one another in the New Year, Whole Hearted Parenting offers a New Year's family meeting activity to help discover what family members desire in 2009. Instead of making typical resolutions, parents and children can learn what each other wishes to achieve and then support one another's success. Access your worksheet for each family member at the link below, fill them out in a family meeting, then discuss and support!
Being in nature is of value in many ways for families. Growing a vegetable garden is not only a great lesson in nature but also a way for families to connect. Details and a blog with more information and feedback are at this informative site. This is a great way to go green in 2009.
Ahhh, the beauty of finding your note! I think I could like him. Finding your note is something like finding your purpose in life or landing where you need to be. Philosopher James Allen advised, "Above all be of single aim; have a legitimate and useful purpose, and devote yourself unreservedly to it." He could have said, "Find your note and stay with it.
I believe that is an important part of being happy. Like Helen Keller says, true happiness is attained "through fidelity to a worthy purpose.
In music, staking your claim on one note will drive everyone around you nuts. But finding the right note in life, and giving yourself to it, can be a source of unending joy.
The Tale of Despereaux, a lusciously animated film adaptation of Kate DiCamillo's Newbury Medal-winning novel, opens as the royal chef is presenting a new soup to the King. Then the story begins! Pair watching this leisurely paced film with making minestrone soup with your family, and you've got an unforgettable match! The soup recipe from Caroline Styne – co-owner two Los Angeles restaurants and a mother of two who is committed to quality ingredients, sustainable farming and to making each meal a delicious experience – and advice about cooking with children are included.
Matt Sanders – Professor of Parenting Studies and Family Psychology at the University of Auckland and director of the University of Queensland's Parenting and Family Support Centre – discusses the most challenging job there is – parenting – and the value in parent education.
Where is Deborah Speaking in January/February?


It wasn't until other store associates of color noticed that she was famous that the original saleswomen changed her tune and helped Gabby.
"To be fair, I don't know why that saleswoman didn't want to help me. I suspect it's because I'm black, but it could also be because I'm fat. Maybe my whole life, every time I thought someone was being racist, they were actually mistreating me because I'm fat.
Fat, black, tall, short, yellow, or blue no one should be dismissed by a salesperson for the way they physically look. The Chanel name carries so must class but that saleswomen was definitely class-less.
Chanel expresses our sincerest regret for the boutique customer service experience that Ms. Sidibe mentioned in this essay. We are sorry that she felt unwelcome and offended.
We took her words very seriously and immediately investigated to understand what happened, knowing that this is absolutely not in line with the high standards that Chanel wishes to provide to our customers.
We are strongly committed to provide anyone who comes in our boutiques with the best customer service, and we do hope that in the future Ms. Sidibe will choose to come back to a Chanel boutique and experience the real Chanel customer experience.
While you're here be sure to check out Gabby's incredible feature in Nylon magazine HERE.


Welcome to the Dollar Bead Club!
The Dollar Bead Club is a Direct-to-Member Warehouse Club, offering the best price on quality beads and beading products to our Members. We offer a wide variety of items, from beads, buttons and brass to clasps, chains and charms. Our extensive list of products is continually expanding.
Best of all - everything in our Shop is $1!
Membership in the Dollar Bead Club is available 2 ways.


text:
10 Castle-Like Hotels In Malaysia For A Staycation Fit For Royalty
Michelle Chee Malaysia
Malaysia's castle-like hotels for kings & queens
Imagination can only get you so far when it comes to pretending to live as a prince or princess and building your own castle of pillows will make you second-guess your maturity. Besides, tidying up the fort is tedious. Here's an alternative – a staycation at castle-like hotels.
You may not believe it, but there are many hotels and resorts in Malaysia offering a glimpse of fantasy. They look just like castles or palaces! With accommodation that comes alive from the pages of a story book, your staycation will begin with a 'once upon a time' at these 10 places.
1. Macalister Mansion
Nestled in the heart of Georgetown, Penang, is a heritage colonial mansion built about 100 years ago, that was given a modern interior overhaul – its outer façade, however, has remained intact. The boutique hotel houses only eight rooms and persists as an ode to English colonial culture, with its iconic architecture and tea!
Source: @sywong_
Source: @dolzies_
Price: From RM990
Address: 228, Jalan Macalister, George Town, 11400 George Town, Pulau Pinang, Malaysia
2. The Chateau Spa and Organic Wellness Resort
Source: @the_chateau_resort
Inspired by the medieval 'Haut-Koenigsbourg' castle in France, this resort offers a cool and relaxing getaway in Berjaya Hills, just an hour's drive from the Klang Valley. Visitors can choose from their extensive spa and wellness packages, which are the main attractions.
Apart from that, they also have weight-loss and detox programs that you can sign up for, conducted by professional in-house trainers. Otherwise, wander around the hotel and breathe in the air of royalty or convert the place into your own makeshift photoshoot studio – there are many instagram-worthy spots dotted all over the resort!
Source: @iqbal_ia
Source: @paulinetls
Price: From RM564 (Book here!)
Address: KM48,Persimpangan Bertingkat . Lebuhraya Karak, Kuala Lumpur, Federal Territory of Kuala Lumpur, Malaysia
3. Palace of the Golden Horses
The Turkish inspired minarets, domes and archways in this extraordinary hotel give the impression that you're in a desert oasis, overlooking a sparkling lake. In fact, all you need now is a magic flying carpet and a boisterous genie. Apart from being the venue of many landmark VIP meetings in the past, this hotel was also featured in one of Jackie Chan's films.
While rooms of various sizes for the common guests are abound, there are also accommodation designed for heads-of-state, monarchs and special VVIPs that come with some extra perks, like butler services. However, if you'd rather skip the atas treatment and go on a night out, you'll find a plethora of entertainment centres nearby, like boat rides on the lake and a shopping mall called The Mines just a stone's throw away.
Source: @pictures_may
Source: @shazzlien
Address: Jalan Kuda Emas, Mines Wellness City, 43300 Seri Kembangan, Selangor, Malaysia
4. Merdeka Palace
The Merdeka Palace Hotel is possibly one of the most recognizable landmarks at the Kuching waterfront area, where many tourist attractions are located. In fact, the hotel is smack in the middle of Kuching's historical district, which means you can explore museums and attractions on foot, like the Sarawak Museum, Chinese History Museum and Sarawak Islamic Museum.
The opulent lobby is enough to impress you, with its shiny tall beams, and marble covered floors and ceilings. You can just imagine James Brooke, the first White Rajah of Sarawak, leisurely enjoying a cigar here while swirling a glass of whiskey.
Address: Jalan Tun Abang Hj Openg, Taman Budaya, 93000 Kuching, Sarawak, Malaysia
5. First World Hotel and Plaza
When Genting Highlands was first developed as a resort destination, First World Hotel was one of the earliest buildings to be erected. It holds the current Guinness World Record for the most number of rooms – a whooping total of 7,351. Imagine the amount of housekeeping staff!
That aside, the colourful hotel is a massive building that rivals any castle, strategically linked to a whole lot of attractions which you can access without ever leaving the building. Since you'll be in Resorts World Genting, might as well enjoy the multitude of indoor theme parks, shops and eateries in the complex.
Source: @chchaw96
Source: @fabianfan
Address: First World Hotel & Plaza, Genting Highlands, 69000 Genting Highlands, Pahang, Malaysia
6. The Palace Hotel
Kota Kinabalu is the last place you'd expect to find a whitewashed castle, complete with turrets and towers – which is exactly what the Palace Hotel is. It's nestled at the end of Jalan Tangki, the city's cozy corner, away from the noise and traffic. The hotel overlooks plenty of greenery, so you'd like to feel like a King or Queen surveying their lands, climb up to the highest turret!
Address: No 1, Jalan Tangki, Karamunsing, 88100 Kota Kinabalu, Sabah, Malaysia
7. Colmar Tropicale
Despite having the word 'Tropicale' (meaning 'tropical' in Italian) in its name, you get the distinct feeling that you're in a quaint village in the Swiss Alps. However, the developers of this resort were actually inspired by the village of Colmar in France which explains the cobblestone streets and dormer roofs.
Like many castles, Colmar Tropicale's entry point has a makeshift moat and drawbridge and even has a fountain in its central square, reminiscent of a early medieval european villages. The resort is a romantic destination, worthy of being named after the country it is emulating – France.
Address: KM 48 Persimpangan Bertingkat, Lebuhraya Karak, Bukit Tinggi, 28750 Bentong, Pahang, Malaysia
8. Bella Vista Waterfront Resort and Spa
This Disney-castle-like hotel is located on the paradise island of Langkawi, Kedah, and is strategically located just beside the sea. This makes it ideal for those who are looking for a truly tropical holiday by the beach. Langkawi has some of the most beautiful beaches in Malaysia, with sand as fine as flour, and water so clear you'll be able to see your feet.
Source : @bvhotelsandresorts
Address: Persiaran Mutiara 2, Pusat Dagangan Kelana Mas, 07000 Langkawi, Kedah, Malaysia
9. Casa del Rio
Source: @jyap97
You'd be convinced that you're in the Mediterranean while visiting Melaka's Casa del Rio, with its overhanging balconies, Moorish fountain and curved arches. In fact, the hotel was purposefully designed that way, to pay homage to Melaka's past as a Portuguese colony.
However, you'll also see many local heritage elements, like Peranakan pottery and Malay batik in the interior decorations. The hotel is located on the banks of the Melaka River and guests can take a short 5-minute walk to reach Melaka's main tourist areas like Jonker Walk and the Stadthuys.
Source: @8dna8
Address: 88, Jalan Laksamana, Taman Kota Laksamana, 75200 Melaka, Malaysia
10. Grand Kampar Hotel
The small town of Kampar may come across as just another sleepy town, but it hides a surprising secret – the Grand Kampar Hotel. Built in 2007, this young hotel continues to attract visitors, not just for its design, but for its warm hospitality that includes a complimentary buffet breakfast. The façade is reminiscent of colonial-era hotels, with aesthetics that mirrors the movie The Grand Budapest Hotel!
Source: @jeremy_kron
Address: Taman Bandar Baru, 31900 Kampar, Perak, Malaysia
A storybook ending to a grand staycation
They say you shouldn't expect life to end with a 'happily ever after' like in the storybooks, but in the least, your staycations should. Whether you're visiting another state for a getaway or looking for a hotel for a short staycation, staying in these castle-like hotels and resorts have the same outcome – you check out from the hotel feeling relaxed.
Black Friday: This One-Stop Coupon Site Has Discounts For All Singaporeans
5 Things Every Homeowner Needs To Know Before Buying Your First Flat

redpajama_set_name: RedPajamaCommonCrawl


Alcudia Holiday Bookings For Just £359 with IceLolly Discount Now!
As Low As to From £101 on Prague Holiday Bookings - at IceLolly Now!
Are you planning a wonderful travel and looking for the fairly priced packages of travel. IceLolly are here waiting for you with a variety of travel packages whether you want to travel with your family, friends or lovers. With the help of IceLolly, you don't need to worry about any problem of flight, hotel, car hire and even travel arrangement. If you want to get some incredible deals on package holiday you book from IceLolly, it may be worth visiting IceLolly discount code page of our website, where you will find a lot of amazing IceLolly offers.
If you pay attention to the detail and procedure, you can save more money when you are shopping at IceLolly.
Without a doubt, the most effective way to save the money is to check out the IceLollydiscount codes, voucher codes and promo codes in the moneysavingnow.co.uk, it is the most direct and most convenient way. You can pay attention to the IceLolly sales and deals in the moneysavingnow.co.uk. We are proud of checking and updating the IceLolly discount codes and deals every day to guarantee they are 100% valid and working.in the deals and sales you can enjoy the saving of the IceLolly In addition, you also can focus on the website of IceLolly,IceLolly sometimes provide the sales and deal can also save some money. You can find that IceLolly provide the free delivery in the 'more about 'below the IceLolly site.
Where can i find the the IceLolly discounts and voucher code?
You can search the name of IceLolly and then you'll find the merchant page of the IceLolly. Just need to click "Get code", "Get discount" or "Get deal". A pop-up will displays to you and you'll find the detailed code and discount information.
Is the IceLolly is a trusted online Retailer?
Yes. The IceLolly is one the most welcomed online stores for its quality products and excellent service and recognized by the quality agency of industry.
Don't miss out on the latest IceLolly discount code from Money Saving Now! Save with these IceLolly discount codes valid in 时间. Check money saving now latest IceLolly voucher codes and discount codes to get money off of on your online order. Get IceLolly voucher code to save site wide from IceLolly. Money Saving Now will never let you down to collect biggest IceLolly discount codes. Moreover, Money Saving Now's stuff takes the time to verify whether IceLolly discount codes valid or not, all we want to do is to help save you money. Our goal is to ensure all IceLolly discount codes can be used by everyone. But however, some of the IceLolly voucher code have exclusions or restrictions, so check the IceLolly voucher code terms before your shopping.
The online website of IceLolly provides great discount and exclusive money saving offers online for various kinds of products by using IceLolly promo code and deals.
There're many coupon websites provides the latest IceLollydiscount code and vouchers. Moneysavingnow will be your perfect choice. moneysavingnow.co.uk provides the 100% valid exclusive discount code and promo code for IceLolly. You can best offers at IceLolly by using the discount code and deals.
Just need to click "Get code" on the merchant page of IceLolly. Input the code when you go to payment. It's so easy and simple. Now try to enjoy great savings at IceLolly with voucher code and discounts from moneysavingnow.co.uk.
How to Use My IceLolly Discount Code?
How Do I Use My IceLolly Voucher?
The procedure for using the IceLollyvouchers is simple. So you will get huge savings with the IceLolly discount codes.
Pick up your favorite items from IceLollyand add to your shopping cart.
Copy IceLolly codes before check out to payment page.
Find the little box on the checkout page to enter your IceLolly promo code.
Proceed to the final step to pay for your items Smart customers will never pay full price for the items that they need, at Moneysavingnow, you can find the 100% valid discounts for money saving, which can make sure to help people to enjoy happy shopping experience with IceLolly voucher codes. Never miss the opportunity to save big from IceLolly.


text:
Richard makes short work of caddie role
PUBLISHED: 15:46 14 August 2001 | UPDATED: 10:26 03 March 2010
GOLF: YOU may recall the story of 16-year-old Richard Davies who caddied for former European Tour player Paul Curry in the Open Championship at Royal Lytham.
YOU may recall the story of 16-year-old Richard Davies who caddied for former European Tour player Paul Curry in the Open Championship at Royal Lytham.
Richard, who weighs less than eight stone, carried Paul's heavy Ping Tour bag all four days of The Open which amounted to two-thirds of his body weight.
While Richard's caddie duties are likely to be put on hold as Paul has returned to Florida to continue playing on the Buy.Com Tour and also try to get his US Tour card, the youngster continues to make strides as a player.
At his home club of Rossendale in Lancashire, Richard shot a two over par gross 73 in the club's July medal and as a result has had his handicap cut from eight to seven.
To add to that, Richard and his father Robert, who plays off five, won the Rossendale 36-hole Foursomes Championship.
A bubbly character and certainly not lacking confidence, we will probably hear more of young Richard in the future.


text:
function[new_marray] = useMarkerLCD(marray, str_ray, all_str, oldclean)
% function - given an input cell array of markers, find the empty indexes
% in each, and use for each marker data from lowest common denominator of
% available indexes. This will remove any possible missing data from
% parameter calculations, while allowing for the maximum possible amount of
% indexes for each calculation.
%
% form    : function[new_marray] = useMarkerLCD(marray, str_ray, all_str)
%
% INPUTS  : marray - marker array of the input markers you want to find the
%                   LCD number of indexes for
%           str_ray - string names of the markers in marray
%           all_str - string names of all the markers
% OUTPUTS : new_marray - updated markers from marray that now have the LCD
%                        number of indexes in their data structures.
%
% Created     : 27oct2015 (Asgard Kaleb Marroquin)
% Last edited : 27oct2015 (Asgard Kaleb Marroquin)

% need function for removing blank indexes - % 27oct2015 finished function!
% done with rmBlankData - set 'bool' value to 0

% run rmBlankData to find which of the markers has the most idx missing
for hi = 1 : length(marray)
	[tmpclean{hi}, ~, ~] = rmBlankData(oldclean, marray{hi}, 8, 0, 0);   % 8 is a dummy input - %%missing is irrelevenat when taking a flat cut (bool==0)
end

% find which is the LCD of indexes by finding wich of the newclean is the
% smallest
for i = 1 : length(tmpclean)
    tmp_names = fieldnames(tmpclean{i});
    frame_tmp   = struct2cell(tmpclean{i}.(tmp_names{find(cellfun(@(word) ~isempty(word), regexp(fieldnames(tmpclean{i}), 'Frame', 'match')))})); % define frames automatically :)
    frame       = cell2mat(frame_tmp{:});
    l(i) = length(frame);
end

% lcd - value of smallest - lidx - shows which l(#) is the smallest
[lcd, lidx] = min(l);

% so then only use the markers with the lowest common denom!
% assign each element in
% lowest length tmpclean data vector:
goodclean = tmpclean{lidx};

% for hi = 1 : length(marray)
%     [~,~,new_marray{hi}] = rmBlankData(goodclean, marray{hi}, 9, 0);
% end

for k = 1 : length(str_ray) % loop for every marker - find its idx in the structure list
    str_idx{k} = regexp(all_str, str_ray{k});
    stridx(k) = find(~cellfun(@isempty, str_idx{k})); % get index

    new_marray{k} = goodclean.(all_str{stridx(k)}); % assign new value to be the marker idx
                                    % from goodclean (goodclean is the LCD idx # of the marker vector inputed)
end

end

redpajama_set_name: RedPajamaGithub


Tellurium (Te), semimetallic chemical element in the oxygen group (Group 16 [VIa] of the periodic table), closely allied with the element selenium in chemical and physical properties. Tellurium is a silvery white element with properties intermediate between those of metals and nonmetals; it makes up approximately one part per billion of Earth's crust. Like selenium, it is less often found uncombined than as compounds of metals such as copper, lead, silver, or gold and is obtained chiefly as a by-product of the refining of copper or lead. No large use for tellurium has been found.
The element tellurium was isolated before it was actually known to be an elemental species. About 1782 Franz Joseph Müller von Reichenstein, an Austrian mineralogist, worked with an ore referred to as German gold. From this ore he obtained a material that defied his attempts at analysis and was called by him metallum problematicum. In 1798 Martin Heinrich Klaproth confirmed Müller's observations and established the elemental nature of the substance. He named the element after man's "heavenly body" Tellus, or Earth.
The demand for tellurium does not match that for selenium. The two elements are found together in many ores; they may be isolated by employing the processes described in connection with selenium, obtaining solutions containing salts of both selenious and tellurous acids, H2SeO3 and H2TeO3. Upon treatment of these solutions with sulfuric acid, tellurium dioxide, TeO2, separates because of its low solubility, while the selenious acid remains dissolved. The tellurium dioxide can be converted into elemental tellurium by treatment with sulfur dioxide; an electrolytic process is used to purify the product.
Japan, the United States, and Canada are the world's largest producers of tellurium.
In tellurium, the covalent bonding necessary to provide large ring- and chain-molecules by catenation is almost nonexistent. The element crystallizes in the rhombohedral form. It is silvery white and isomorphous with gray selenium—that is, the structure and dimensions of the crystals are very similar. It is brittle but not very hard. The tellurium atoms form spiral chains in the crystal with Te–Te distances of 3.74 Å.
The element is a poor conductor of heat and only a fair conductor of electricity. Tellurium burns in air or in oxygen with a blue-green flame, forming the dioxide (TeO2). It is unaffected by hydrochloric acid, but either nitric acid or aqua regia (a mixture of nitric acid and hydrochloric acid) oxidizes it to tellurous acid (H2TeO3). It reacts with the halogens (fluorine, chlorine, bromine, and iodine) to form halides, and it combines with most metals at elevated temperatures to form tellurides.
Although there are adequate supplies of the element, no single use has been developed that creates a large demand for it. Small amounts of tellurium increase the ductility of aluminum alloys, the hardness and tensile strength of tin alloys, and the machinability of stainless steel and copper; in lead and in manganese-magnesium alloys, it increases resistance to corrosion. Bismuth telluride and lead telluride are semiconducting materials that have been used in thermoelectric devices either as sources of electricity or for cooling purposes.


text:
County Board Advertises $1.021 Tax Rate
ARLnow.com February 25, 2013 at 3:05pm
The Arlington County Board voted over the weekend to advertise a higher property tax rate than that proposed by County Manager Barbara Donnellan in her proposed FY 2014 budget.
By advertising the $1.021 rate, the Board will have the flexibility of raising the tax rate up to 102.1 cents per $100 in assessed real estate value. The Board can still, as it usually does, select a lower rate than advertised when it adopts its final budget in April.
Donnellan proposed a $1.003 rate — a 3.2 cent rate increase that would cost the average Arlington homeowner an additional $262 per year. The advertised $1.021 rate — a 5 cent increase from the current 97.1 cent rate — would cost the average homeowner an extra $356 per year (nearly $30 per month, a 5.3 percent increase) over the current tax rate.
The four Board members present for Saturday's meeting — Chris Zimmerman was home sick with the flu — split the difference between two different rate proposals.
Jay Fisette and Mary Hynes proposed to advertise a $1.011 rate, an increase of 4 cents, citing concerns about taxpayers who might be impacted by the upcoming federal budget sequester.
"I want to send a message… that if others are being called to tighten their belts, that we will exert the same discipline," Fisette said. He called Donnellan's proposed 3.2 cent tax rate increase and spending cuts "a really reasonable balance."
Libby Garvey and Board Chairman Walter Tejada argued for a 6 cent increase, citing uncertainty about how the sequester might affect county finances and the finances of those served by the social safety net.
"I don't think 4 cents will be enough," Tejada said. "Sequestration is hanging over our heads. We have to make decisions now and anticipate and prepare. I want to be as responsible as we can for all taxpayers… including the most vulnerable in our community."
In the end, the Board voted for a compromise 5 cent advertised rate.
"In this climate of economic uncertainty, it is important that the Board maintain some flexibility in setting the tax rate for Fiscal Year 2014," Tejada said in a statement. "In the coming weeks, we will engage intensively with our community on how best to balance necessary service cuts with a reasonable tax rate increase. "
The Board also voted to decrease solid waste rates and fees and certain permitting and park fees. After being adopted in April, the final rates and fees set by the Board will go into effect on July 1, 2013, the start of the county's 2014 fiscal year.
Barbara Donnellan budget County Board taxes
DEVELOPING: Person shot, Bob & Edith's on Columbia Pike damaged after night of gunfire
One person was seriously injured and Bob & Edith's Diner was damaged after two separate incidents of gunfire in Arlington last night.
Wakefield Advances to State TourneyFees for Parks, Events Set to Increase


"Made in fairly modest quantities, this Merlot bears dark fruit that shows a pleasing, dusty quality. The blend includes 11% Cabernet Sauvignon, which keeps it in the Bordeauxstyle camp. Firm and concentrated, it finishes with a tasty mix of cocoa, coffee grounds and Asian spices."


I'd been dying to get one of these from Sublime Doughnuts since I discovered owner Kamal Grant was offering them. We finally had an excuse to get one yesterday for Junior Moon's eleventh birthday. She squealed with delight when we presented it to her ablaze with candles.
I want to meet the assholes that comprise the 7% that do not like Sublime donuts. I mean, I guess there must be people out there that hate genuine people who modestly create a wonderful product for the community at a fair price.
Anyways…very great birthday idea Jen, I didn't know about that, thanks!
I've been thinking about ordering this just because – no birthday needed.
that's awesome! i did not know about that – thanks for the tip. i think ….
What a great alternative to a traditional birthday cake at a fantastic price! I haven't been to Sublime yet, and I'm definitely stopping by soon. Wonder if they do a Mother's Day donut box…my mom would die!
They have a Sublime donut ice cream during dinner at Noon in Midtown, http://www.noonmidtown.com. Tried dinner there last night, but did not try the ice cream. Will definitely be going back and adding it to my rotation of Go-To restaurants for dinner. Dinner was fantastic. It was as good quality, taste, and presentation-wise as most of the other more expensive and popular restaurants around town, but at a significantly lower price and a more casual setting. I highly recommend that everyone check it out.


Shadi Ki Raat Book Authored by Abdul Hadi Abdul Khaliq Madani. Marriage is very important event in human life, but most people are unmarried by their nature. The present book "Adab Al Zafafa "Shadi Ki Rat" provide very important information in the light of Quran and Hadith regarding the significance and nature of marriage. Complete Islamic manners of marriage for both men and women in Urdu language. Must read before marriage for Muslim groom and bridal.
Shaadi Ki Raat book is now available on Pakistan virtual library in high quality Pdf document for the study of our visitors. Check out the following links to read online or download the complete book in Pdf format and enjoy offline reading in your computer and smartphone.


text:
U.S.-Based BBB National Programs Announced as Winner for "Best Sectoral Initiative" by International Council of Advertising Self-Regulation
ICAS 2021 Global Awards Cite Direct Selling Self-Regulatory Council for "Promoting Truth and Transparency in the Direct Selling Industry"
This press release was published on June 15, 2021 by ICAS. You can find the original here.
France, India, the Netherlands, the UK, and the US were honored for effective advertising self-regulation
On 15 June 2021, the International Council for Advertising Self-Regulation (ICAS) announced the winners of its second edition of the ICAS Global Awards. The objective of the ICAS Awards is to reward initiatives that contribute to responsible marketing practices and a more effective and impactful self-regulatory system.
Four categories of Awards were open to the ICAS Self-Regulatory Organization network members. All entries were reviewed, and winners selected by an international independent jury of self-regulatory experts, chaired by Ms Angela Mills Wade, Executive Director, European Publishers Council. The other jury members were Carla Michelotti, Consultant, Retired Chief Legal/Government/Corporate Affairs Officer at Leo Burnett Worldwide and Vice-President of the International Advertising Association (IAA), Rui Neves dos Santos, Vice President & Associate General Counsel, Procter & Gamble International Operations, S.A., Raelene Martin, Deputy Director – Trade and Investment, ICC and Andrew McCowan, Lecturer at the University of Technology in Sidney, and Strategy Director at the Core Agency.
At a virtual ceremony on 15 June, the following winners were announced:
For Best Awareness-Raising Initiative: ASCI, the Advertising Standards Council of India, for their impactful ASCI Aston (scroll) which ran across all TV Channels, supported by the Ministry of Information & Broadcasting (MIB) in India which achieved an exceptional reach and maximized awareness about the SRO.
For Thought-Leadership: the joint initiative of the SROs in France (ARPP), the Netherlands (SRC) and the UK (ASA) for their collaboration to share learnings, best practice and ultimately technological tools including software and algorithms to better regulate the growing digital landscape;
For Best Sectoral Initiative: BBB National Programs in the US for their Direct Selling Self-Regulatory Council, an initiative developed to promote truth and transparency in the direct selling industry including an effective proactive monitoring of the marketplace;
Special Prize: ASCI, the Advertising Standards Council of India, for their expansion of the suo motu monitoring of misleading claims in ads across 3 000 digital platforms.
The ICAS Awards Jury also gave two entries a special mention due to their valuable and inspirational promotion of effective self-regulatory practices. This special recognition was given to:
AUTOCONTROL (Spain) for their Awareness Campaign that was supported by the European Commission;
ASCI, the Advertising Standards Council of India, for their Guidelines for "Online Gaming for Real Money Winnings".
Angela Mills Wade, Executive Director, EPC, and Jury Chairman said:
"Being involved in the ICAS Awards has been a truly rewarding experience, especially working with such a well-qualified and experienced jury and finding out about all the different initiatives of SROs around the world. It was also noteworthy to see how well the SROs have embraced the latest technology including AI to such good effect and that they have been open to tackling new areas such as gaming and influencer marketing in their work. Congratulations to our winners and to all SROs who took part so enthusiastically."
ICAS applauds all winners and thanks all participants in the ICAS Awards. All the initiatives rewarded contribute to the promotion of effective and meaningful self-regulation, and the encouragement of ethical and responsible marketing and advertising practices. ICAS encourages organizations worldwide to seek inspiration from the winners as well as from the other SROs that had submitted excellent initiatives and to support the development and use of efficient, effective and innovative self-regulatory standards and solutions. ICAS also warmly thanks the jury members for their dedication and efforts.
Latest Decisions
Direct Selling Self-Regulatory Council Recommends Le-Vel Discontinue Certain Earnings and Health-Related Product Performance Claims in Compliance Inquiry
McLean, VA – January 19, 2022 – The Direct Selling Self-Regulatory Council (DSSRC) opened a compliance inquiry to review advertising from Le-Vel Brands, LLC that had been the subject of an inquiry from 2020. DSSRC recommended that the new product performance and earnings claims identified in...
Read the Decision
National Advertising Division Finds Glad Trash Bags Product Packaging Not Misleading; Recommends Glad Discontinue or Modify Other Advertising Claims
New York, NY – January 19, 2022 – The National Advertising Division (NAD) determined that product packaging for Glad Products Company's ForceFlex Plus with Clorox Tall Kitchen Drawstring Bags appropriately ties the Clorox brand to its odor elimination role, and that product packaging for...
Direct Selling Self-Regulatory Council Recommends Immunotec Discontinue Certain Earnings and Health-Related Product Performance Claims
McLean, VA – January 18, 2022 – The Direct Selling Self-Regulatory Council (DSSRC) recommended that certain product performance and earnings claims made by Immunotec and its salesforce be discontinued.
National Advertising Review Board Recommends PLx Pharma Either Discontinue or Modify "Clinically Shown" Claim for its Vazalore Aspirin Product
New York, NY – January 13, 2022 – A panel of the National Advertising Review Board (NARB) recommended that PLx Pharma Inc. either discontinue use of the claim that Vazalore "is the first liquid-filled aspirin capsule clinically shown to cause fewer ulcers than plain aspirin" or modify it to...


text:
The Walking Dead Season 2 Episode 4 Amid the Ruins (Steam Store)
After escaping Carver's imprisonment, Clementine and the rest of the runaways try to find each other. Can everyone reunite and find another safe haven?
That's right, episode four of The Walking Dead and boy is it intense. I can't spoil the game but you have people dying left and right. One of the characters will die no matter what you do. Not to mention that Clementine, the girl who acted as Lee's morality pet, can commit acts of cruelty in the name of survival. At first, I thought this episode was brilliant until a conversation with lukebbtt led me to discover that most of the characters are only there for Clementine's growth. There are characters that exist outside of her, such as Kenny who's completely broken with Rebecca's baby being his only reason for living. After everything Kenny's been through, he is not right in the head and it shows by how he's trying to recreate his family instead of accepting their deaths.
The game play is the same as every other episode. You pick dialogue choices for Clementine. Sometimes, you have to explore the scene and inspect objects to move the plot forward. Other times, you'll have to make crucial decisions at key moments. One decision was so hard for me that I had to pause the game to think about it. Keep your guard up when the walkers attack, because you'll have to press the right keys to get out of there alive.
This game is intense and additive. I give it 9 out of 10; I was upset for hours after playing this.
Posted in steam and tagged amid the ruins, interactive story, point and click, steam, the walking dead, the walking dead game, video games, zombie apocalypse, zombies
2 thoughts on "The Walking Dead Season 2 Episode 4 Amid the Ruins (Steam Store)"
lukebbtt on August 2, 2014 at 1:15 pm said:
Thanks for the shout-out. I am so happy that a third season of this game has been confirmed.
suburbantimewaster on August 2, 2014 at 1:49 pm said:
No problem. You and me both.


Super Savings Item! Free Shipping Included! Save 31% on the Donner 8pcs DMX512 DMX Dfi DJ 2.4G Wireless 7 Receiver & 1 Transmitter Stage Lighting Control by Donner at IGWT. MPN: EC757+EC758x7. Hurry! Limited time offer. Offer valid only while supplies last. Specification:1. 2.4G wireless DMX512 R/T 2. 126 channels jumping frequency automatically, high anti-jamming ability, to ensure works reliability 3.
3. 7 groups ID code settable, User can use 7 groups individual wireless net without any interfere.
DMX512 wireless receiver/transmitter transmits standard DMX512 protocol data (generated by console) by wireless way. No time delay when signal data is transmitting, signal data is real time and reliably.
This product adopts a 2.4G ISM frequency section. High effective GFSK modulate, communication design; 126 channels jumping frequency automatically, high anti-jamming ability.
If you have any questions about this product by Donner, contact us by completing and submitting the form below. If you are looking for a specif part number, please include it with your message.


text:
using namespace llvm;
using namespace llvm::object;

#define DEBUG_TYPE "dyld"

static inline std::error_code check(std::error_code Err) {
  if (Err) {
    report_fatal_error(Err.message());
  }
  return Err;
}

namespace {

template <class ELFT> class DyldELFObject : public ELFObjectFile<ELFT> {
  LLVM_ELF_IMPORT_TYPES_ELFT(ELFT)

  typedef Elf_Shdr_Impl<ELFT> Elf_Shdr;
  typedef Elf_Sym_Impl<ELFT> Elf_Sym;
  typedef Elf_Rel_Impl<ELFT, false> Elf_Rel;
  typedef Elf_Rel_Impl<ELFT, true> Elf_Rela;

  typedef Elf_Ehdr_Impl<ELFT> Elf_Ehdr;

  typedef typename ELFDataTypeTypedefHelper<ELFT>::value_type addr_type;

public:
  DyldELFObject(MemoryBufferRef Wrapper, std::error_code &ec);

  void updateSectionAddress(const SectionRef &Sec, uint64_t Addr);

  void updateSymbolAddress(const SymbolRef &SymRef, uint64_t Addr);

  // Methods for type inquiry through isa, cast and dyn_cast
  static inline bool classof(const Binary *v) {
    return (isa<ELFObjectFile<ELFT>>(v) &&
            classof(cast<ELFObjectFile<ELFT>>(v)));
  }
  static inline bool classof(const ELFObjectFile<ELFT> *v) {
    return v->isDyldType();
  }

};

// The MemoryBuffer passed into this constructor is just a wrapper around the
// actual memory.  Ultimately, the Binary parent class will take ownership of
// this MemoryBuffer object but not the underlying memory.
template <class ELFT>
DyldELFObject<ELFT>::DyldELFObject(MemoryBufferRef Wrapper, std::error_code &EC)
    : ELFObjectFile<ELFT>(Wrapper, EC) {
  this->isDyldELFObject = true;
}

template <class ELFT>
void DyldELFObject<ELFT>::updateSectionAddress(const SectionRef &Sec,
                                               uint64_t Addr) {
  DataRefImpl ShdrRef = Sec.getRawDataRefImpl();
  Elf_Shdr *shdr =
      const_cast<Elf_Shdr *>(reinterpret_cast<const Elf_Shdr *>(ShdrRef.p));

  // This assumes the address passed in matches the target address bitness
  // The template-based type cast handles everything else.
  shdr->sh_addr = static_cast<addr_type>(Addr);
}

template <class ELFT>
void DyldELFObject<ELFT>::updateSymbolAddress(const SymbolRef &SymRef,
                                              uint64_t Addr) {

  Elf_Sym *sym = const_cast<Elf_Sym *>(
      ELFObjectFile<ELFT>::getSymbol(SymRef.getRawDataRefImpl()));

  // This assumes the address passed in matches the target address bitness
  // The template-based type cast handles everything else.
  sym->st_value = static_cast<addr_type>(Addr);
}

class LoadedELFObjectInfo : public RuntimeDyld::LoadedObjectInfo {
public:
  LoadedELFObjectInfo(RuntimeDyldImpl &RTDyld, unsigned BeginIdx,
                      unsigned EndIdx)
    : RuntimeDyld::LoadedObjectInfo(RTDyld, BeginIdx, EndIdx) {}

  OwningBinary<ObjectFile>
  getObjectForDebug(const ObjectFile &Obj) const override;
};

template <typename ELFT>
std::unique_ptr<DyldELFObject<ELFT>>
createRTDyldELFObject(MemoryBufferRef Buffer,
                      const LoadedELFObjectInfo &L,
                      std::error_code &ec) {
  typedef typename ELFFile<ELFT>::Elf_Shdr Elf_Shdr;
  typedef typename ELFDataTypeTypedefHelper<ELFT>::value_type addr_type;

  std::unique_ptr<DyldELFObject<ELFT>> Obj =
    llvm::make_unique<DyldELFObject<ELFT>>(Buffer, ec);

  // Iterate over all sections in the object.
  for (const auto &Sec : Obj->sections()) {
    StringRef SectionName;
    Sec.getName(SectionName);
    if (SectionName != "") {
      DataRefImpl ShdrRef = Sec.getRawDataRefImpl();
      Elf_Shdr *shdr = const_cast<Elf_Shdr *>(
          reinterpret_cast<const Elf_Shdr *>(ShdrRef.p));

      if (uint64_t SecLoadAddr = L.getSectionLoadAddress(SectionName)) {
        // This assumes that the address passed in matches the target address
        // bitness. The template-based type cast handles everything else.
        shdr->sh_addr = static_cast<addr_type>(SecLoadAddr);
      }
    }
  }

  return Obj;
}

OwningBinary<ObjectFile> createELFDebugObject(const ObjectFile &Obj,
                                              const LoadedELFObjectInfo &L) {
  assert(Obj.isELF() && "Not an ELF object file.");

  std::unique_ptr<MemoryBuffer> Buffer =
    MemoryBuffer::getMemBufferCopy(Obj.getData(), Obj.getFileName());

  std::error_code ec;

  std::unique_ptr<ObjectFile> DebugObj;
  if (Obj.getBytesInAddress() == 4 && Obj.isLittleEndian()) {
    typedef ELFType<support::little, 2, false> ELF32LE;
    DebugObj = createRTDyldELFObject<ELF32LE>(Buffer->getMemBufferRef(), L, ec);
  } else if (Obj.getBytesInAddress() == 4 && !Obj.isLittleEndian()) {
    typedef ELFType<support::big, 2, false> ELF32BE;
    DebugObj = createRTDyldELFObject<ELF32BE>(Buffer->getMemBufferRef(), L, ec);
  } else if (Obj.getBytesInAddress() == 8 && !Obj.isLittleEndian()) {
    typedef ELFType<support::big, 2, true> ELF64BE;
    DebugObj = createRTDyldELFObject<ELF64BE>(Buffer->getMemBufferRef(), L, ec);
  } else if (Obj.getBytesInAddress() == 8 && Obj.isLittleEndian()) {
    typedef ELFType<support::little, 2, true> ELF64LE;
    DebugObj = createRTDyldELFObject<ELF64LE>(Buffer->getMemBufferRef(), L, ec);
  } else
    llvm_unreachable("Unexpected ELF format");

  assert(!ec && "Could not construct copy ELF object file");

  return OwningBinary<ObjectFile>(std::move(DebugObj), std::move(Buffer));
}

OwningBinary<ObjectFile>
LoadedELFObjectInfo::getObjectForDebug(const ObjectFile &Obj) const {
  return createELFDebugObject(Obj, *this);
}

} // namespace

namespace llvm {

RuntimeDyldELF::RuntimeDyldELF(RTDyldMemoryManager *mm) : RuntimeDyldImpl(mm) {}
RuntimeDyldELF::~RuntimeDyldELF() {}

void RuntimeDyldELF::registerEHFrames() {
  if (!MemMgr)
    return;
  for (int i = 0, e = UnregisteredEHFrameSections.size(); i != e; ++i) {
    SID EHFrameSID = UnregisteredEHFrameSections[i];
    uint8_t *EHFrameAddr = Sections[EHFrameSID].Address;
    uint64_t EHFrameLoadAddr = Sections[EHFrameSID].LoadAddress;
    size_t EHFrameSize = Sections[EHFrameSID].Size;
    MemMgr->registerEHFrames(EHFrameAddr, EHFrameLoadAddr, EHFrameSize);
    RegisteredEHFrameSections.push_back(EHFrameSID);
  }
  UnregisteredEHFrameSections.clear();
}

void RuntimeDyldELF::deregisterEHFrames() {
  if (!MemMgr)
    return;
  for (int i = 0, e = RegisteredEHFrameSections.size(); i != e; ++i) {
    SID EHFrameSID = RegisteredEHFrameSections[i];
    uint8_t *EHFrameAddr = Sections[EHFrameSID].Address;
    uint64_t EHFrameLoadAddr = Sections[EHFrameSID].LoadAddress;
    size_t EHFrameSize = Sections[EHFrameSID].Size;
    MemMgr->deregisterEHFrames(EHFrameAddr, EHFrameLoadAddr, EHFrameSize);
  }
  RegisteredEHFrameSections.clear();
}

std::unique_ptr<RuntimeDyld::LoadedObjectInfo>
RuntimeDyldELF::loadObject(const object::ObjectFile &O) {
  unsigned SectionStartIdx, SectionEndIdx;
  std::tie(SectionStartIdx, SectionEndIdx) = loadObjectImpl(O);
  return llvm::make_unique<LoadedELFObjectInfo>(*this, SectionStartIdx,
                                                SectionEndIdx);
}

void RuntimeDyldELF::resolveX86_64Relocation(const SectionEntry &Section,
                                             uint64_t Offset, uint64_t Value,
                                             uint32_t Type, int64_t Addend,
                                             uint64_t SymOffset) {
  switch (Type) {
  default:
    llvm_unreachable("Relocation type not implemented yet!");
    break;
  case ELF::R_X86_64_64: {
    support::ulittle64_t::ref(Section.Address + Offset) = Value + Addend;
    DEBUG(dbgs() << "Writing " << format("%p", (Value + Addend)) << " at "
                 << format("%p\n", Section.Address + Offset));
    break;
  }
  case ELF::R_X86_64_32:
  case ELF::R_X86_64_32S: {
    Value += Addend;
    assert((Type == ELF::R_X86_64_32 && (Value <= UINT32_MAX)) ||
           (Type == ELF::R_X86_64_32S &&
            ((int64_t)Value <= INT32_MAX && (int64_t)Value >= INT32_MIN)));
    uint32_t TruncatedAddr = (Value & 0xFFFFFFFF);
    support::ulittle32_t::ref(Section.Address + Offset) = TruncatedAddr;
    DEBUG(dbgs() << "Writing " << format("%p", TruncatedAddr) << " at "
                 << format("%p\n", Section.Address + Offset));
    break;
  }
  case ELF::R_X86_64_GOTPCREL: {
    // findGOTEntry returns the 'G + GOT' part of the relocation calculation
    // based on the load/target address of the GOT (not the current/local addr).
    uint64_t GOTAddr = findGOTEntry(Value, SymOffset);
    uint64_t FinalAddress = Section.LoadAddress + Offset;
    // The processRelocationRef method combines the symbol offset and the addend
    // and in most cases that's what we want.  For this relocation type, we need
    // the raw addend, so we subtract the symbol offset to get it.
    int64_t RealOffset = GOTAddr + Addend - SymOffset - FinalAddress;
    assert(RealOffset <= INT32_MAX && RealOffset >= INT32_MIN);
    int32_t TruncOffset = (RealOffset & 0xFFFFFFFF);
    support::ulittle32_t::ref(Section.Address + Offset) = TruncOffset;
    break;
  }
  case ELF::R_X86_64_PC32: {
    // Get the placeholder value from the generated object since
    // a previous relocation attempt may have overwritten the loaded version
    support::ulittle32_t::ref Placeholder(
        (void *)(Section.ObjAddress + Offset));
    uint64_t FinalAddress = Section.LoadAddress + Offset;
    int64_t RealOffset = Placeholder + Value + Addend - FinalAddress;
    assert(RealOffset <= INT32_MAX && RealOffset >= INT32_MIN);
    int32_t TruncOffset = (RealOffset & 0xFFFFFFFF);
    support::ulittle32_t::ref(Section.Address + Offset) = TruncOffset;
    break;
  }
  case ELF::R_X86_64_PC64: {
    // Get the placeholder value from the generated object since
    // a previous relocation attempt may have overwritten the loaded version
    support::ulittle64_t::ref Placeholder(
        (void *)(Section.ObjAddress + Offset));
    uint64_t FinalAddress = Section.LoadAddress + Offset;
    support::ulittle64_t::ref(Section.Address + Offset) =
        Placeholder + Value + Addend - FinalAddress;
    break;
  }
  }
}

void RuntimeDyldELF::resolveX86Relocation(const SectionEntry &Section,
                                          uint64_t Offset, uint32_t Value,
                                          uint32_t Type, int32_t Addend) {
  switch (Type) {
  case ELF::R_386_32: {
    // Get the placeholder value from the generated object since
    // a previous relocation attempt may have overwritten the loaded version
    support::ulittle32_t::ref Placeholder(
        (void *)(Section.ObjAddress + Offset));
    support::ulittle32_t::ref(Section.Address + Offset) =
        Placeholder + Value + Addend;
    break;
  }
  case ELF::R_386_PC32: {
    // Get the placeholder value from the generated object since
    // a previous relocation attempt may have overwritten the loaded version
    support::ulittle32_t::ref Placeholder(
        (void *)(Section.ObjAddress + Offset));
    uint32_t FinalAddress = ((Section.LoadAddress + Offset) & 0xFFFFFFFF);
    uint32_t RealOffset = Placeholder + Value + Addend - FinalAddress;
    support::ulittle32_t::ref(Section.Address + Offset) = RealOffset;
    break;
  }
  default:
    // There are other relocation types, but it appears these are the
    // only ones currently used by the LLVM ELF object writer
    llvm_unreachable("Relocation type not implemented yet!");
    break;
  }
}

void RuntimeDyldELF::resolveAArch64Relocation(const SectionEntry &Section,
                                              uint64_t Offset, uint64_t Value,
                                              uint32_t Type, int64_t Addend) {
  uint32_t *TargetPtr = reinterpret_cast<uint32_t *>(Section.Address + Offset);
  uint64_t FinalAddress = Section.LoadAddress + Offset;

  DEBUG(dbgs() << "resolveAArch64Relocation, LocalAddress: 0x"
               << format("%llx", Section.Address + Offset)
               << " FinalAddress: 0x" << format("%llx", FinalAddress)
               << " Value: 0x" << format("%llx", Value) << " Type: 0x"
               << format("%x", Type) << " Addend: 0x" << format("%llx", Addend)
               << "\n");

  switch (Type) {
  default:
    llvm_unreachable("Relocation type not implemented yet!");
    break;
  case ELF::R_AARCH64_ABS64: {
    uint64_t *TargetPtr =
        reinterpret_cast<uint64_t *>(Section.Address + Offset);
    *TargetPtr = Value + Addend;
    break;
  }
  case ELF::R_AARCH64_PREL32: {
    uint64_t Result = Value + Addend - FinalAddress;
    assert(static_cast<int64_t>(Result) >= INT32_MIN &&
           static_cast<int64_t>(Result) <= UINT32_MAX);
    *TargetPtr = static_cast<uint32_t>(Result & 0xffffffffU);
    break;
  }
  case ELF::R_AARCH64_CALL26: // fallthrough
  case ELF::R_AARCH64_JUMP26: {
    // Operation: S+A-P. Set Call or B immediate value to bits fff_fffc of the
    // calculation.
    uint64_t BranchImm = Value + Addend - FinalAddress;

    // "Check that -2^27 <= result < 2^27".
    assert(-(1LL << 27) <= static_cast<int64_t>(BranchImm) &&
           static_cast<int64_t>(BranchImm) < (1LL << 27));

    // AArch64 code is emitted with .rela relocations. The data already in any
    // bits affected by the relocation on entry is garbage.
    *TargetPtr &= 0xfc000000U;
    // Immediate goes in bits 25:0 of B and BL.
    *TargetPtr |= static_cast<uint32_t>(BranchImm & 0xffffffcU) >> 2;
    break;
  }
  case ELF::R_AARCH64_MOVW_UABS_G3: {
    uint64_t Result = Value + Addend;

    // AArch64 code is emitted with .rela relocations. The data already in any
    // bits affected by the relocation on entry is garbage.
    *TargetPtr &= 0xffe0001fU;
    // Immediate goes in bits 20:5 of MOVZ/MOVK instruction
    *TargetPtr |= Result >> (48 - 5);
    // Shift must be "lsl #48", in bits 22:21
    assert((*TargetPtr >> 21 & 0x3) == 3 && "invalid shift for relocation");
    break;
  }
  case ELF::R_AARCH64_MOVW_UABS_G2_NC: {
    uint64_t Result = Value + Addend;

    // AArch64 code is emitted with .rela relocations. The data already in any
    // bits affected by the relocation on entry is garbage.
    *TargetPtr &= 0xffe0001fU;
    // Immediate goes in bits 20:5 of MOVZ/MOVK instruction
    *TargetPtr |= ((Result & 0xffff00000000ULL) >> (32 - 5));
    // Shift must be "lsl #32", in bits 22:21
    assert((*TargetPtr >> 21 & 0x3) == 2 && "invalid shift for relocation");
    break;
  }
  case ELF::R_AARCH64_MOVW_UABS_G1_NC: {
    uint64_t Result = Value + Addend;

    // AArch64 code is emitted with .rela relocations. The data already in any
    // bits affected by the relocation on entry is garbage.
    *TargetPtr &= 0xffe0001fU;
    // Immediate goes in bits 20:5 of MOVZ/MOVK instruction
    *TargetPtr |= ((Result & 0xffff0000U) >> (16 - 5));
    // Shift must be "lsl #16", in bits 22:2
    assert((*TargetPtr >> 21 & 0x3) == 1 && "invalid shift for relocation");
    break;
  }
  case ELF::R_AARCH64_MOVW_UABS_G0_NC: {
    uint64_t Result = Value + Addend;

    // AArch64 code is emitted with .rela relocations. The data already in any
    // bits affected by the relocation on entry is garbage.
    *TargetPtr &= 0xffe0001fU;
    // Immediate goes in bits 20:5 of MOVZ/MOVK instruction
    *TargetPtr |= ((Result & 0xffffU) << 5);
    // Shift must be "lsl #0", in bits 22:21.
    assert((*TargetPtr >> 21 & 0x3) == 0 && "invalid shift for relocation");
    break;
  }
  case ELF::R_AARCH64_ADR_PREL_PG_HI21: {
    // Operation: Page(S+A) - Page(P)
    uint64_t Result =
        ((Value + Addend) & ~0xfffULL) - (FinalAddress & ~0xfffULL);

    // Check that -2^32 <= X < 2^32
    assert(static_cast<int64_t>(Result) >= (-1LL << 32) &&
           static_cast<int64_t>(Result) < (1LL << 32) &&
           "overflow check failed for relocation");

    // AArch64 code is emitted with .rela relocations. The data already in any
    // bits affected by the relocation on entry is garbage.
    *TargetPtr &= 0x9f00001fU;
    // Immediate goes in bits 30:29 + 5:23 of ADRP instruction, taken
    // from bits 32:12 of X.
    *TargetPtr |= ((Result & 0x3000U) << (29 - 12));
    *TargetPtr |= ((Result & 0x1ffffc000ULL) >> (14 - 5));
    break;
  }
  case ELF::R_AARCH64_LDST32_ABS_LO12_NC: {
    // Operation: S + A
    uint64_t Result = Value + Addend;

    // AArch64 code is emitted with .rela relocations. The data already in any
    // bits affected by the relocation on entry is garbage.
    *TargetPtr &= 0xffc003ffU;
    // Immediate goes in bits 21:10 of LD/ST instruction, taken
    // from bits 11:2 of X
    *TargetPtr |= ((Result & 0xffc) << (10 - 2));
    break;
  }
  case ELF::R_AARCH64_LDST64_ABS_LO12_NC: {
    // Operation: S + A
    uint64_t Result = Value + Addend;

    // AArch64 code is emitted with .rela relocations. The data already in any
    // bits affected by the relocation on entry is garbage.
    *TargetPtr &= 0xffc003ffU;
    // Immediate goes in bits 21:10 of LD/ST instruction, taken
    // from bits 11:3 of X
    *TargetPtr |= ((Result & 0xff8) << (10 - 3));
    break;
  }
  }
}

void RuntimeDyldELF::resolveARMRelocation(const SectionEntry &Section,
                                          uint64_t Offset, uint32_t Value,
                                          uint32_t Type, int32_t Addend) {
  // TODO: Add Thumb relocations.
  uint32_t *Placeholder =
      reinterpret_cast<uint32_t *>(Section.ObjAddress + Offset);
  uint32_t *TargetPtr = (uint32_t *)(Section.Address + Offset);
  uint32_t FinalAddress = ((Section.LoadAddress + Offset) & 0xFFFFFFFF);
  Value += Addend;

  DEBUG(dbgs() << "resolveARMRelocation, LocalAddress: "
               << Section.Address + Offset
               << " FinalAddress: " << format("%p", FinalAddress) << " Value: "
               << format("%x", Value) << " Type: " << format("%x", Type)
               << " Addend: " << format("%x", Addend) << "\n");

  switch (Type) {
  default:
    llvm_unreachable("Not implemented relocation type!");

  case ELF::R_ARM_NONE:
    break;
  // Write a 32bit value to relocation address, taking into account the
  // implicit addend encoded in the target.
  case ELF::R_ARM_PREL31:
  case ELF::R_ARM_TARGET1:
  case ELF::R_ARM_ABS32:
    *TargetPtr = *Placeholder + Value;
    break;
  // Write first 16 bit of 32 bit value to the mov instruction.
  // Last 4 bit should be shifted.
  case ELF::R_ARM_MOVW_ABS_NC:
    // We are not expecting any other addend in the relocation address.
    // Using 0x000F0FFF because MOVW has its 16 bit immediate split into 2
    // non-contiguous fields.
    assert((*Placeholder & 0x000F0FFF) == 0);
    Value = Value & 0xFFFF;
    *TargetPtr = *Placeholder | (Value & 0xFFF);
    *TargetPtr |= ((Value >> 12) & 0xF) << 16;
    break;
  // Write last 16 bit of 32 bit value to the mov instruction.
  // Last 4 bit should be shifted.
  case ELF::R_ARM_MOVT_ABS:
    // We are not expecting any other addend in the relocation address.
    // Use 0x000F0FFF for the same reason as R_ARM_MOVW_ABS_NC.
    assert((*Placeholder & 0x000F0FFF) == 0);

    Value = (Value >> 16) & 0xFFFF;
    *TargetPtr = *Placeholder | (Value & 0xFFF);
    *TargetPtr |= ((Value >> 12) & 0xF) << 16;
    break;
  // Write 24 bit relative value to the branch instruction.
  case ELF::R_ARM_PC24: // Fall through.
  case ELF::R_ARM_CALL: // Fall through.
  case ELF::R_ARM_JUMP24: {
    int32_t RelValue = static_cast<int32_t>(Value - FinalAddress - 8);
    RelValue = (RelValue & 0x03FFFFFC) >> 2;
    assert((*TargetPtr & 0xFFFFFF) == 0xFFFFFE);
    *TargetPtr &= 0xFF000000;
    *TargetPtr |= RelValue;
    break;
  }
  case ELF::R_ARM_PRIVATE_0:
    // This relocation is reserved by the ARM ELF ABI for internal use. We
    // appropriate it here to act as an R_ARM_ABS32 without any addend for use
    // in the stubs created during JIT (which can't put an addend into the
    // original object file).
    *TargetPtr = Value;
    break;
  }
}

void RuntimeDyldELF::resolveMIPSRelocation(const SectionEntry &Section,
                                           uint64_t Offset, uint32_t Value,
                                           uint32_t Type, int32_t Addend) {
  uint32_t *Placeholder =
      reinterpret_cast<uint32_t *>(Section.ObjAddress + Offset);
  uint32_t *TargetPtr = (uint32_t *)(Section.Address + Offset);
  Value += Addend;

  DEBUG(dbgs() << "resolveMipselocation, LocalAddress: "
               << Section.Address + Offset << " FinalAddress: "
               << format("%p", Section.LoadAddress + Offset) << " Value: "
               << format("%x", Value) << " Type: " << format("%x", Type)
               << " Addend: " << format("%x", Addend) << "\n");

  switch (Type) {
  default:
    llvm_unreachable("Not implemented relocation type!");
    break;
  case ELF::R_MIPS_32:
    *TargetPtr = Value + (*Placeholder);
    break;
  case ELF::R_MIPS_26:
    *TargetPtr = ((*Placeholder) & 0xfc000000) | ((Value & 0x0fffffff) >> 2);
    break;
  case ELF::R_MIPS_HI16:
    // Get the higher 16-bits. Also add 1 if bit 15 is 1.
    Value += ((*Placeholder) & 0x0000ffff) << 16;
    *TargetPtr =
        ((*Placeholder) & 0xffff0000) | (((Value + 0x8000) >> 16) & 0xffff);
    break;
  case ELF::R_MIPS_LO16:
    Value += ((*Placeholder) & 0x0000ffff);
    *TargetPtr = ((*Placeholder) & 0xffff0000) | (Value & 0xffff);
    break;
  case ELF::R_MIPS_UNUSED1:
    // Similar to ELF::R_ARM_PRIVATE_0, R_MIPS_UNUSED1 and R_MIPS_UNUSED2
    // are used for internal JIT purpose. These relocations are similar to
    // R_MIPS_HI16 and R_MIPS_LO16, but they do not take any addend into
    // account.
    *TargetPtr =
        ((*TargetPtr) & 0xffff0000) | (((Value + 0x8000) >> 16) & 0xffff);
    break;
  case ELF::R_MIPS_UNUSED2:
    *TargetPtr = ((*TargetPtr) & 0xffff0000) | (Value & 0xffff);
    break;
  }
}

// Return the .TOC. section and offset.
void RuntimeDyldELF::findPPC64TOCSection(const ObjectFile &Obj,
                                         ObjSectionToIDMap &LocalSections,
                                         RelocationValueRef &Rel) {
  // Set a default SectionID in case we do not find a TOC section below.
  // This may happen for references to TOC base base (sym@toc, .odp
  // relocation) without a .toc directive.  In this case just use the
  // first section (which is usually the .odp) since the code won't
  // reference the .toc base directly.
  Rel.SymbolName = NULL;
  Rel.SectionID = 0;

  // The TOC consists of sections .got, .toc, .tocbss, .plt in that
  // order. The TOC starts where the first of these sections starts.
  for (section_iterator si = Obj.section_begin(), se = Obj.section_end();
       si != se; ++si) {

    StringRef SectionName;
    check(si->getName(SectionName));

    if (SectionName == ".got"
        || SectionName == ".toc"
        || SectionName == ".tocbss"
        || SectionName == ".plt") {
      Rel.SectionID = findOrEmitSection(Obj, *si, false, LocalSections);
      break;
    }
  }

  // Per the ppc64-elf-linux ABI, The TOC base is TOC value plus 0x8000
  // thus permitting a full 64 Kbytes segment.
  Rel.Addend = 0x8000;
}

// Returns the sections and offset associated with the ODP entry referenced
// by Symbol.
void RuntimeDyldELF::findOPDEntrySection(const ObjectFile &Obj,
                                         ObjSectionToIDMap &LocalSections,
                                         RelocationValueRef &Rel) {
  // Get the ELF symbol value (st_value) to compare with Relocation offset in
  // .opd entries
  for (section_iterator si = Obj.section_begin(), se = Obj.section_end();
       si != se; ++si) {
    section_iterator RelSecI = si->getRelocatedSection();
    if (RelSecI == Obj.section_end())
      continue;

    StringRef RelSectionName;
    check(RelSecI->getName(RelSectionName));
    if (RelSectionName != ".opd")
      continue;

    for (relocation_iterator i = si->relocation_begin(),
                             e = si->relocation_end();
         i != e;) {
      // The R_PPC64_ADDR64 relocation indicates the first field
      // of a .opd entry
      uint64_t TypeFunc;
      check(i->getType(TypeFunc));
      if (TypeFunc != ELF::R_PPC64_ADDR64) {
        ++i;
        continue;
      }

      uint64_t TargetSymbolOffset;
      symbol_iterator TargetSymbol = i->getSymbol();
      check(i->getOffset(TargetSymbolOffset));
      int64_t Addend;
      check(getELFRelocationAddend(*i, Addend));

      ++i;
      if (i == e)
        break;

      // Just check if following relocation is a R_PPC64_TOC
      uint64_t TypeTOC;
      check(i->getType(TypeTOC));
      if (TypeTOC != ELF::R_PPC64_TOC)
        continue;

      // Finally compares the Symbol value and the target symbol offset
      // to check if this .opd entry refers to the symbol the relocation
      // points to.
      if (Rel.Addend != (int64_t)TargetSymbolOffset)
        continue;

      section_iterator tsi(Obj.section_end());
      check(TargetSymbol->getSection(tsi));
      bool IsCode = tsi->isText();
      Rel.SectionID = findOrEmitSection(Obj, (*tsi), IsCode, LocalSections);
      Rel.Addend = (intptr_t)Addend;
      return;
    }
  }
  llvm_unreachable("Attempting to get address of ODP entry!");
}

// Relocation masks following the #lo(value), #hi(value), #ha(value),
// #higher(value), #highera(value), #highest(value), and #highesta(value)
// macros defined in section 4.5.1. Relocation Types of the PPC-elf64abi
// document.

static inline uint16_t applyPPClo(uint64_t value) { return value & 0xffff; }

static inline uint16_t applyPPChi(uint64_t value) {
  return (value >> 16) & 0xffff;
}

static inline uint16_t applyPPCha (uint64_t value) {
  return ((value + 0x8000) >> 16) & 0xffff;
}

static inline uint16_t applyPPChigher(uint64_t value) {
  return (value >> 32) & 0xffff;
}

static inline uint16_t applyPPChighera (uint64_t value) {
  return ((value + 0x8000) >> 32) & 0xffff;
}

static inline uint16_t applyPPChighest(uint64_t value) {
  return (value >> 48) & 0xffff;
}

static inline uint16_t applyPPChighesta (uint64_t value) {
  return ((value + 0x8000) >> 48) & 0xffff;
}

void RuntimeDyldELF::resolvePPC64Relocation(const SectionEntry &Section,
                                            uint64_t Offset, uint64_t Value,
                                            uint32_t Type, int64_t Addend) {
  uint8_t *LocalAddress = Section.Address + Offset;
  switch (Type) {
  default:
    llvm_unreachable("Relocation type not implemented yet!");
    break;
  case ELF::R_PPC64_ADDR16:
    writeInt16BE(LocalAddress, applyPPClo(Value + Addend));
    break;
  case ELF::R_PPC64_ADDR16_DS:
    writeInt16BE(LocalAddress, applyPPClo(Value + Addend) & ~3);
    break;
  case ELF::R_PPC64_ADDR16_LO:
    writeInt16BE(LocalAddress, applyPPClo(Value + Addend));
    break;
  case ELF::R_PPC64_ADDR16_LO_DS:
    writeInt16BE(LocalAddress, applyPPClo(Value + Addend) & ~3);
    break;
  case ELF::R_PPC64_ADDR16_HI:
    writeInt16BE(LocalAddress, applyPPChi(Value + Addend));
    break;
  case ELF::R_PPC64_ADDR16_HA:
    writeInt16BE(LocalAddress, applyPPCha(Value + Addend));
    break;
  case ELF::R_PPC64_ADDR16_HIGHER:
    writeInt16BE(LocalAddress, applyPPChigher(Value + Addend));
    break;
  case ELF::R_PPC64_ADDR16_HIGHERA:
    writeInt16BE(LocalAddress, applyPPChighera(Value + Addend));
    break;
  case ELF::R_PPC64_ADDR16_HIGHEST:
    writeInt16BE(LocalAddress, applyPPChighest(Value + Addend));
    break;
  case ELF::R_PPC64_ADDR16_HIGHESTA:
    writeInt16BE(LocalAddress, applyPPChighesta(Value + Addend));
    break;
  case ELF::R_PPC64_ADDR14: {
    assert(((Value + Addend) & 3) == 0);
    // Preserve the AA/LK bits in the branch instruction
    uint8_t aalk = *(LocalAddress + 3);
    writeInt16BE(LocalAddress + 2, (aalk & 3) | ((Value + Addend) & 0xfffc));
  } break;
  case ELF::R_PPC64_REL16_LO: {
    uint64_t FinalAddress = (Section.LoadAddress + Offset);
    uint64_t Delta = Value - FinalAddress + Addend;
    writeInt16BE(LocalAddress, applyPPClo(Delta));
  } break;
  case ELF::R_PPC64_REL16_HI: {
    uint64_t FinalAddress = (Section.LoadAddress + Offset);
    uint64_t Delta = Value - FinalAddress + Addend;
    writeInt16BE(LocalAddress, applyPPChi(Delta));
  } break;
  case ELF::R_PPC64_REL16_HA: {
    uint64_t FinalAddress = (Section.LoadAddress + Offset);
    uint64_t Delta = Value - FinalAddress + Addend;
    writeInt16BE(LocalAddress, applyPPCha(Delta));
  } break;
  case ELF::R_PPC64_ADDR32: {
    int32_t Result = static_cast<int32_t>(Value + Addend);
    if (SignExtend32<32>(Result) != Result)
      llvm_unreachable("Relocation R_PPC64_ADDR32 overflow");
    writeInt32BE(LocalAddress, Result);
  } break;
  case ELF::R_PPC64_REL24: {
    uint64_t FinalAddress = (Section.LoadAddress + Offset);
    int32_t delta = static_cast<int32_t>(Value - FinalAddress + Addend);
    if (SignExtend32<24>(delta) != delta)
      llvm_unreachable("Relocation R_PPC64_REL24 overflow");
    // Generates a 'bl <address>' instruction
    writeInt32BE(LocalAddress, 0x48000001 | (delta & 0x03FFFFFC));
  } break;
  case ELF::R_PPC64_REL32: {
    uint64_t FinalAddress = (Section.LoadAddress + Offset);
    int32_t delta = static_cast<int32_t>(Value - FinalAddress + Addend);
    if (SignExtend32<32>(delta) != delta)
      llvm_unreachable("Relocation R_PPC64_REL32 overflow");
    writeInt32BE(LocalAddress, delta);
  } break;
  case ELF::R_PPC64_REL64: {
    uint64_t FinalAddress = (Section.LoadAddress + Offset);
    uint64_t Delta = Value - FinalAddress + Addend;
    writeInt64BE(LocalAddress, Delta);
  } break;
  case ELF::R_PPC64_ADDR64:
    writeInt64BE(LocalAddress, Value + Addend);
    break;
  }
}

void RuntimeDyldELF::resolveSystemZRelocation(const SectionEntry &Section,
                                              uint64_t Offset, uint64_t Value,
                                              uint32_t Type, int64_t Addend) {
  uint8_t *LocalAddress = Section.Address + Offset;
  switch (Type) {
  default:
    llvm_unreachable("Relocation type not implemented yet!");
    break;
  case ELF::R_390_PC16DBL:
  case ELF::R_390_PLT16DBL: {
    int64_t Delta = (Value + Addend) - (Section.LoadAddress + Offset);
    assert(int16_t(Delta / 2) * 2 == Delta && "R_390_PC16DBL overflow");
    writeInt16BE(LocalAddress, Delta / 2);
    break;
  }
  case ELF::R_390_PC32DBL:
  case ELF::R_390_PLT32DBL: {
    int64_t Delta = (Value + Addend) - (Section.LoadAddress + Offset);
    assert(int32_t(Delta / 2) * 2 == Delta && "R_390_PC32DBL overflow");
    writeInt32BE(LocalAddress, Delta / 2);
    break;
  }
  case ELF::R_390_PC32: {
    int64_t Delta = (Value + Addend) - (Section.LoadAddress + Offset);
    assert(int32_t(Delta) == Delta && "R_390_PC32 overflow");
    writeInt32BE(LocalAddress, Delta);
    break;
  }
  case ELF::R_390_64:
    writeInt64BE(LocalAddress, Value + Addend);
    break;
  }
}

// The target location for the relocation is described by RE.SectionID and
// RE.Offset.  RE.SectionID can be used to find the SectionEntry.  Each
// SectionEntry has three members describing its location.
// SectionEntry::Address is the address at which the section has been loaded
// into memory in the current (host) process.  SectionEntry::LoadAddress is the
// address that the section will have in the target process.
// SectionEntry::ObjAddress is the address of the bits for this section in the
// original emitted object image (also in the current address space).
//
// Relocations will be applied as if the section were loaded at
// SectionEntry::LoadAddress, but they will be applied at an address based
// on SectionEntry::Address.  SectionEntry::ObjAddress will be used to refer to
// Target memory contents if they are required for value calculations.
//
// The Value parameter here is the load address of the symbol for the
// relocation to be applied.  For relocations which refer to symbols in the
// current object Value will be the LoadAddress of the section in which
// the symbol resides (RE.Addend provides additional information about the
// symbol location).  For external symbols, Value will be the address of the
// symbol in the target address space.
void RuntimeDyldELF::resolveRelocation(const RelocationEntry &RE,
                                       uint64_t Value) {
  const SectionEntry &Section = Sections[RE.SectionID];
  return resolveRelocation(Section, RE.Offset, Value, RE.RelType, RE.Addend,
                           RE.SymOffset);
}

void RuntimeDyldELF::resolveRelocation(const SectionEntry &Section,
                                       uint64_t Offset, uint64_t Value,
                                       uint32_t Type, int64_t Addend,
                                       uint64_t SymOffset) {
  switch (Arch) {
  case Triple::x86_64:
    resolveX86_64Relocation(Section, Offset, Value, Type, Addend, SymOffset);
    break;
  case Triple::x86:
    resolveX86Relocation(Section, Offset, (uint32_t)(Value & 0xffffffffL), Type,
                         (uint32_t)(Addend & 0xffffffffL));
    break;
  case Triple::aarch64:
  case Triple::aarch64_be:
    resolveAArch64Relocation(Section, Offset, Value, Type, Addend);
    break;
  case Triple::arm: // Fall through.
  case Triple::armeb:
  case Triple::thumb:
  case Triple::thumbeb:
    resolveARMRelocation(Section, Offset, (uint32_t)(Value & 0xffffffffL), Type,
                         (uint32_t)(Addend & 0xffffffffL));
    break;
  case Triple::mips: // Fall through.
  case Triple::mipsel:
    resolveMIPSRelocation(Section, Offset, (uint32_t)(Value & 0xffffffffL),
                          Type, (uint32_t)(Addend & 0xffffffffL));
    break;
  case Triple::ppc64: // Fall through.
  case Triple::ppc64le:
    resolvePPC64Relocation(Section, Offset, Value, Type, Addend);
    break;
  case Triple::systemz:
    resolveSystemZRelocation(Section, Offset, Value, Type, Addend);
    break;
  default:
    llvm_unreachable("Unsupported CPU type!");
  }
}

relocation_iterator RuntimeDyldELF::processRelocationRef(
    unsigned SectionID, relocation_iterator RelI,
    const ObjectFile &Obj,
    ObjSectionToIDMap &ObjSectionToID,
    StubMap &Stubs) {
  uint64_t RelType;
  Check(RelI->getType(RelType));
  int64_t Addend;
  Check(getELFRelocationAddend(*RelI, Addend));
  symbol_iterator Symbol = RelI->getSymbol();

  // Obtain the symbol name which is referenced in the relocation
  StringRef TargetName;
  if (Symbol != Obj.symbol_end())
    Symbol->getName(TargetName);
  DEBUG(dbgs() << "\t\tRelType: " << RelType << " Addend: " << Addend
               << " TargetName: " << TargetName << "\n");
  RelocationValueRef Value;
  // First search for the symbol in the local symbol table
  SymbolRef::Type SymType = SymbolRef::ST_Unknown;

  // Search for the symbol in the global symbol table
  RTDyldSymbolTable::const_iterator gsi = GlobalSymbolTable.end();
  if (Symbol != Obj.symbol_end()) {
    gsi = GlobalSymbolTable.find(TargetName.data());
    Symbol->getType(SymType);
  }
  if (gsi != GlobalSymbolTable.end()) {
    const auto &SymInfo = gsi->second;
    Value.SectionID = SymInfo.getSectionID();
    Value.Offset = SymInfo.getOffset();
    Value.Addend = SymInfo.getOffset() + Addend;
  } else {
    switch (SymType) {
    case SymbolRef::ST_Debug: {
      // TODO: Now ELF SymbolRef::ST_Debug = STT_SECTION, it's not obviously
      // and can be changed by another developers. Maybe best way is add
      // a new symbol type ST_Section to SymbolRef and use it.
      section_iterator si(Obj.section_end());
      Symbol->getSection(si);
      if (si == Obj.section_end())
        llvm_unreachable("Symbol section not found, bad object file format!");
      DEBUG(dbgs() << "\t\tThis is section symbol\n");
      bool isCode = si->isText();
      Value.SectionID = findOrEmitSection(Obj, (*si), isCode, ObjSectionToID);
      Value.Addend = Addend;
      break;
    }
    case SymbolRef::ST_Data:
    case SymbolRef::ST_Unknown: {
      Value.SymbolName = TargetName.data();
      Value.Addend = Addend;

      // Absolute relocations will have a zero symbol ID (STN_UNDEF), which
      // will manifest here as a NULL symbol name.
      // We can set this as a valid (but empty) symbol name, and rely
      // on addRelocationForSymbol to handle this.
      if (!Value.SymbolName)
        Value.SymbolName = "";
      break;
    }
    default:
      llvm_unreachable("Unresolved symbol type!");
      break;
    }
  }

  uint64_t Offset;
  Check(RelI->getOffset(Offset));

  DEBUG(dbgs() << "\t\tSectionID: " << SectionID << " Offset: " << Offset
               << "\n");
  if ((Arch == Triple::aarch64 || Arch == Triple::aarch64_be) &&
      (RelType == ELF::R_AARCH64_CALL26 || RelType == ELF::R_AARCH64_JUMP26)) {
    // This is an AArch64 branch relocation, need to use a stub function.
    DEBUG(dbgs() << "\t\tThis is an AArch64 branch relocation.");
    SectionEntry &Section = Sections[SectionID];

    // Look for an existing stub.
    StubMap::const_iterator i = Stubs.find(Value);
    if (i != Stubs.end()) {
      resolveRelocation(Section, Offset, (uint64_t)Section.Address + i->second,
                        RelType, 0);
      DEBUG(dbgs() << " Stub function found\n");
    } else {
      // Create a new stub function.
      DEBUG(dbgs() << " Create a new stub function\n");
      Stubs[Value] = Section.StubOffset;
      uint8_t *StubTargetAddr =
          createStubFunction(Section.Address + Section.StubOffset);

      RelocationEntry REmovz_g3(SectionID, StubTargetAddr - Section.Address,
                                ELF::R_AARCH64_MOVW_UABS_G3, Value.Addend);
      RelocationEntry REmovk_g2(SectionID, StubTargetAddr - Section.Address + 4,
                                ELF::R_AARCH64_MOVW_UABS_G2_NC, Value.Addend);
      RelocationEntry REmovk_g1(SectionID, StubTargetAddr - Section.Address + 8,
                                ELF::R_AARCH64_MOVW_UABS_G1_NC, Value.Addend);
      RelocationEntry REmovk_g0(SectionID,
                                StubTargetAddr - Section.Address + 12,
                                ELF::R_AARCH64_MOVW_UABS_G0_NC, Value.Addend);

      if (Value.SymbolName) {
        addRelocationForSymbol(REmovz_g3, Value.SymbolName);
        addRelocationForSymbol(REmovk_g2, Value.SymbolName);
        addRelocationForSymbol(REmovk_g1, Value.SymbolName);
        addRelocationForSymbol(REmovk_g0, Value.SymbolName);
      } else {
        addRelocationForSection(REmovz_g3, Value.SectionID);
        addRelocationForSection(REmovk_g2, Value.SectionID);
        addRelocationForSection(REmovk_g1, Value.SectionID);
        addRelocationForSection(REmovk_g0, Value.SectionID);
      }
      resolveRelocation(Section, Offset,
                        (uint64_t)Section.Address + Section.StubOffset, RelType,
                        0);
      Section.StubOffset += getMaxStubSize();
    }
  } else if (Arch == Triple::arm &&
             (RelType == ELF::R_ARM_PC24 || RelType == ELF::R_ARM_CALL ||
              RelType == ELF::R_ARM_JUMP24)) {
    // This is an ARM branch relocation, need to use a stub function.
    DEBUG(dbgs() << "\t\tThis is an ARM branch relocation.");
    SectionEntry &Section = Sections[SectionID];

    // Look for an existing stub.
    StubMap::const_iterator i = Stubs.find(Value);
    if (i != Stubs.end()) {
      resolveRelocation(Section, Offset, (uint64_t)Section.Address + i->second,
                        RelType, 0);
      DEBUG(dbgs() << " Stub function found\n");
    } else {
      // Create a new stub function.
      DEBUG(dbgs() << " Create a new stub function\n");
      Stubs[Value] = Section.StubOffset;
      uint8_t *StubTargetAddr =
          createStubFunction(Section.Address + Section.StubOffset);
      RelocationEntry RE(SectionID, StubTargetAddr - Section.Address,
                         ELF::R_ARM_PRIVATE_0, Value.Addend);
      if (Value.SymbolName)
        addRelocationForSymbol(RE, Value.SymbolName);
      else
        addRelocationForSection(RE, Value.SectionID);

      resolveRelocation(Section, Offset,
                        (uint64_t)Section.Address + Section.StubOffset, RelType,
                        0);
      Section.StubOffset += getMaxStubSize();
    }
  } else if ((Arch == Triple::mipsel || Arch == Triple::mips) &&
             RelType == ELF::R_MIPS_26) {
    // This is an Mips branch relocation, need to use a stub function.
    DEBUG(dbgs() << "\t\tThis is a Mips branch relocation.");
    SectionEntry &Section = Sections[SectionID];
    uint8_t *Target = Section.Address + Offset;
    uint32_t *TargetAddress = (uint32_t *)Target;

    // Extract the addend from the instruction.
    uint32_t Addend = ((*TargetAddress) & 0x03ffffff) << 2;

    Value.Addend += Addend;

    //  Look up for existing stub.
    StubMap::const_iterator i = Stubs.find(Value);
    if (i != Stubs.end()) {
      RelocationEntry RE(SectionID, Offset, RelType, i->second);
      addRelocationForSection(RE, SectionID);
      DEBUG(dbgs() << " Stub function found\n");
    } else {
      // Create a new stub function.
      DEBUG(dbgs() << " Create a new stub function\n");
      Stubs[Value] = Section.StubOffset;
      uint8_t *StubTargetAddr =
          createStubFunction(Section.Address + Section.StubOffset);

      // Creating Hi and Lo relocations for the filled stub instructions.
      RelocationEntry REHi(SectionID, StubTargetAddr - Section.Address,
                           ELF::R_MIPS_UNUSED1, Value.Addend);
      RelocationEntry RELo(SectionID, StubTargetAddr - Section.Address + 4,
                           ELF::R_MIPS_UNUSED2, Value.Addend);

      if (Value.SymbolName) {
        addRelocationForSymbol(REHi, Value.SymbolName);
        addRelocationForSymbol(RELo, Value.SymbolName);
      } else {
        addRelocationForSection(REHi, Value.SectionID);
        addRelocationForSection(RELo, Value.SectionID);
      }

      RelocationEntry RE(SectionID, Offset, RelType, Section.StubOffset);
      addRelocationForSection(RE, SectionID);
      Section.StubOffset += getMaxStubSize();
    }
  } else if (Arch == Triple::ppc64 || Arch == Triple::ppc64le) {
    if (RelType == ELF::R_PPC64_REL24) {
      // Determine ABI variant in use for this object.
      unsigned AbiVariant;
      Obj.getPlatformFlags(AbiVariant);
      AbiVariant &= ELF::EF_PPC64_ABI;
      // A PPC branch relocation will need a stub function if the target is
      // an external symbol (Symbol::ST_Unknown) or if the target address
      // is not within the signed 24-bits branch address.
      SectionEntry &Section = Sections[SectionID];
      uint8_t *Target = Section.Address + Offset;
      bool RangeOverflow = false;
      if (SymType != SymbolRef::ST_Unknown) {
        if (AbiVariant != 2) {
          // In the ELFv1 ABI, a function call may point to the .opd entry,
          // so the final symbol value is calculated based on the relocation
          // values in the .opd section.
          findOPDEntrySection(Obj, ObjSectionToID, Value);
        } else {
          // In the ELFv2 ABI, a function symbol may provide a local entry
          // point, which must be used for direct calls.
          uint8_t SymOther;
          Symbol->getOther(SymOther);
          Value.Addend += ELF::decodePPC64LocalEntryOffset(SymOther);
        }
        uint8_t *RelocTarget = Sections[Value.SectionID].Address + Value.Addend;
        int32_t delta = static_cast<int32_t>(Target - RelocTarget);
        // If it is within 24-bits branch range, just set the branch target
        if (SignExtend32<24>(delta) == delta) {
          RelocationEntry RE(SectionID, Offset, RelType, Value.Addend);
          if (Value.SymbolName)
            addRelocationForSymbol(RE, Value.SymbolName);
          else
            addRelocationForSection(RE, Value.SectionID);
        } else {
          RangeOverflow = true;
        }
      }
      if (SymType == SymbolRef::ST_Unknown || RangeOverflow == true) {
        // It is an external symbol (SymbolRef::ST_Unknown) or within a range
        // larger than 24-bits.
        StubMap::const_iterator i = Stubs.find(Value);
        if (i != Stubs.end()) {
          // Symbol function stub already created, just relocate to it
          resolveRelocation(Section, Offset,
                            (uint64_t)Section.Address + i->second, RelType, 0);
          DEBUG(dbgs() << " Stub function found\n");
        } else {
          // Create a new stub function.
          DEBUG(dbgs() << " Create a new stub function\n");
          Stubs[Value] = Section.StubOffset;
          uint8_t *StubTargetAddr =
              createStubFunction(Section.Address + Section.StubOffset,
                                 AbiVariant);
          RelocationEntry RE(SectionID, StubTargetAddr - Section.Address,
                             ELF::R_PPC64_ADDR64, Value.Addend);

          // Generates the 64-bits address loads as exemplified in section
          // 4.5.1 in PPC64 ELF ABI.  Note that the relocations need to
          // apply to the low part of the instructions, so we have to update
          // the offset according to the target endianness.
          uint64_t StubRelocOffset = StubTargetAddr - Section.Address;
          if (!IsTargetLittleEndian)
            StubRelocOffset += 2;

          RelocationEntry REhst(SectionID, StubRelocOffset + 0,
                                ELF::R_PPC64_ADDR16_HIGHEST, Value.Addend);
          RelocationEntry REhr(SectionID, StubRelocOffset + 4,
                               ELF::R_PPC64_ADDR16_HIGHER, Value.Addend);
          RelocationEntry REh(SectionID, StubRelocOffset + 12,
                              ELF::R_PPC64_ADDR16_HI, Value.Addend);
          RelocationEntry REl(SectionID, StubRelocOffset + 16,
                              ELF::R_PPC64_ADDR16_LO, Value.Addend);

          if (Value.SymbolName) {
            addRelocationForSymbol(REhst, Value.SymbolName);
            addRelocationForSymbol(REhr, Value.SymbolName);
            addRelocationForSymbol(REh, Value.SymbolName);
            addRelocationForSymbol(REl, Value.SymbolName);
          } else {
            addRelocationForSection(REhst, Value.SectionID);
            addRelocationForSection(REhr, Value.SectionID);
            addRelocationForSection(REh, Value.SectionID);
            addRelocationForSection(REl, Value.SectionID);
          }

          resolveRelocation(Section, Offset,
                            (uint64_t)Section.Address + Section.StubOffset,
                            RelType, 0);
          Section.StubOffset += getMaxStubSize();
        }
        if (SymType == SymbolRef::ST_Unknown) {
          // Restore the TOC for external calls
          if (AbiVariant == 2)
            writeInt32BE(Target + 4, 0xE8410018); // ld r2,28(r1)
          else
            writeInt32BE(Target + 4, 0xE8410028); // ld r2,40(r1)
        }
      }
    } else if (RelType == ELF::R_PPC64_TOC16 ||
               RelType == ELF::R_PPC64_TOC16_DS ||
               RelType == ELF::R_PPC64_TOC16_LO ||
               RelType == ELF::R_PPC64_TOC16_LO_DS ||
               RelType == ELF::R_PPC64_TOC16_HI ||
               RelType == ELF::R_PPC64_TOC16_HA) {
      // These relocations are supposed to subtract the TOC address from
      // the final value.  This does not fit cleanly into the RuntimeDyld
      // scheme, since there may be *two* sections involved in determining
      // the relocation value (the section of the symbol refered to by the
      // relocation, and the TOC section associated with the current module).
      //
      // Fortunately, these relocations are currently only ever generated
      // refering to symbols that themselves reside in the TOC, which means
      // that the two sections are actually the same.  Thus they cancel out
      // and we can immediately resolve the relocation right now.
      switch (RelType) {
      case ELF::R_PPC64_TOC16: RelType = ELF::R_PPC64_ADDR16; break;
      case ELF::R_PPC64_TOC16_DS: RelType = ELF::R_PPC64_ADDR16_DS; break;
      case ELF::R_PPC64_TOC16_LO: RelType = ELF::R_PPC64_ADDR16_LO; break;
      case ELF::R_PPC64_TOC16_LO_DS: RelType = ELF::R_PPC64_ADDR16_LO_DS; break;
      case ELF::R_PPC64_TOC16_HI: RelType = ELF::R_PPC64_ADDR16_HI; break;
      case ELF::R_PPC64_TOC16_HA: RelType = ELF::R_PPC64_ADDR16_HA; break;
      default: llvm_unreachable("Wrong relocation type.");
      }

      RelocationValueRef TOCValue;
      findPPC64TOCSection(Obj, ObjSectionToID, TOCValue);
      if (Value.SymbolName || Value.SectionID != TOCValue.SectionID)
        llvm_unreachable("Unsupported TOC relocation.");
      Value.Addend -= TOCValue.Addend;
      resolveRelocation(Sections[SectionID], Offset, Value.Addend, RelType, 0);
    } else {
      // There are two ways to refer to the TOC address directly: either
      // via a ELF::R_PPC64_TOC relocation (where both symbol and addend are
      // ignored), or via any relocation that refers to the magic ".TOC."
      // symbols (in which case the addend is respected).
      if (RelType == ELF::R_PPC64_TOC) {
        RelType = ELF::R_PPC64_ADDR64;
        findPPC64TOCSection(Obj, ObjSectionToID, Value);
      } else if (TargetName == ".TOC.") {
        findPPC64TOCSection(Obj, ObjSectionToID, Value);
        Value.Addend += Addend;
      }

      RelocationEntry RE(SectionID, Offset, RelType, Value.Addend);

      if (Value.SymbolName)
        addRelocationForSymbol(RE, Value.SymbolName);
      else
        addRelocationForSection(RE, Value.SectionID);
    }
  } else if (Arch == Triple::systemz &&
             (RelType == ELF::R_390_PLT32DBL || RelType == ELF::R_390_GOTENT)) {
    // Create function stubs for both PLT and GOT references, regardless of
    // whether the GOT reference is to data or code.  The stub contains the
    // full address of the symbol, as needed by GOT references, and the
    // executable part only adds an overhead of 8 bytes.
    //
    // We could try to conserve space by allocating the code and data
    // parts of the stub separately.  However, as things stand, we allocate
    // a stub for every relocation, so using a GOT in JIT code should be
    // no less space efficient than using an explicit constant pool.
    DEBUG(dbgs() << "\t\tThis is a SystemZ indirect relocation.");
    SectionEntry &Section = Sections[SectionID];

    // Look for an existing stub.
    StubMap::const_iterator i = Stubs.find(Value);
    uintptr_t StubAddress;
    if (i != Stubs.end()) {
      StubAddress = uintptr_t(Section.Address) + i->second;
      DEBUG(dbgs() << " Stub function found\n");
    } else {
      // Create a new stub function.
      DEBUG(dbgs() << " Create a new stub function\n");

      uintptr_t BaseAddress = uintptr_t(Section.Address);
      uintptr_t StubAlignment = getStubAlignment();
      StubAddress = (BaseAddress + Section.StubOffset + StubAlignment - 1) &
                    -StubAlignment;
      unsigned StubOffset = StubAddress - BaseAddress;

      Stubs[Value] = StubOffset;
      createStubFunction((uint8_t *)StubAddress);
      RelocationEntry RE(SectionID, StubOffset + 8, ELF::R_390_64,
                         Value.Offset);
      if (Value.SymbolName)
        addRelocationForSymbol(RE, Value.SymbolName);
      else
        addRelocationForSection(RE, Value.SectionID);
      Section.StubOffset = StubOffset + getMaxStubSize();
    }

    if (RelType == ELF::R_390_GOTENT)
      resolveRelocation(Section, Offset, StubAddress + 8, ELF::R_390_PC32DBL,
                        Addend);
    else
      resolveRelocation(Section, Offset, StubAddress, RelType, Addend);
  } else if (Arch == Triple::x86_64 && RelType == ELF::R_X86_64_PLT32) {
    // The way the PLT relocations normally work is that the linker allocates
    // the
    // PLT and this relocation makes a PC-relative call into the PLT.  The PLT
    // entry will then jump to an address provided by the GOT.  On first call,
    // the
    // GOT address will point back into PLT code that resolves the symbol. After
    // the first call, the GOT entry points to the actual function.
    //
    // For local functions we're ignoring all of that here and just replacing
    // the PLT32 relocation type with PC32, which will translate the relocation
    // into a PC-relative call directly to the function. For external symbols we
    // can't be sure the function will be within 2^32 bytes of the call site, so
    // we need to create a stub, which calls into the GOT.  This case is
    // equivalent to the usual PLT implementation except that we use the stub
    // mechanism in RuntimeDyld (which puts stubs at the end of the section)
    // rather than allocating a PLT section.
    if (Value.SymbolName) {
      // This is a call to an external function.
      // Look for an existing stub.
      SectionEntry &Section = Sections[SectionID];
      StubMap::const_iterator i = Stubs.find(Value);
      uintptr_t StubAddress;
      if (i != Stubs.end()) {
        StubAddress = uintptr_t(Section.Address) + i->second;
        DEBUG(dbgs() << " Stub function found\n");
      } else {
        // Create a new stub function (equivalent to a PLT entry).
        DEBUG(dbgs() << " Create a new stub function\n");

        uintptr_t BaseAddress = uintptr_t(Section.Address);
        uintptr_t StubAlignment = getStubAlignment();
        StubAddress = (BaseAddress + Section.StubOffset + StubAlignment - 1) &
                      -StubAlignment;
        unsigned StubOffset = StubAddress - BaseAddress;
        Stubs[Value] = StubOffset;
        createStubFunction((uint8_t *)StubAddress);

        // Create a GOT entry for the external function.
        GOTEntries.push_back(Value);

        // Make our stub function a relative call to the GOT entry.
        RelocationEntry RE(SectionID, StubOffset + 2, ELF::R_X86_64_GOTPCREL,
                           -4);
        addRelocationForSymbol(RE, Value.SymbolName);

        // Bump our stub offset counter
        Section.StubOffset = StubOffset + getMaxStubSize();
      }

      // Make the target call a call into the stub table.
      resolveRelocation(Section, Offset, StubAddress, ELF::R_X86_64_PC32,
                        Addend);
    } else {
      RelocationEntry RE(SectionID, Offset, ELF::R_X86_64_PC32, Value.Addend,
                         Value.Offset);
      addRelocationForSection(RE, Value.SectionID);
    }
  } else {
    if (Arch == Triple::x86_64 && RelType == ELF::R_X86_64_GOTPCREL) {
      GOTEntries.push_back(Value);
    }
    RelocationEntry RE(SectionID, Offset, RelType, Value.Addend, Value.Offset);
    if (Value.SymbolName)
      addRelocationForSymbol(RE, Value.SymbolName);
    else
      addRelocationForSection(RE, Value.SectionID);
  }
  return ++RelI;
}

void RuntimeDyldELF::updateGOTEntries(StringRef Name, uint64_t Addr) {

  SmallVectorImpl<std::pair<SID, GOTRelocations>>::iterator it;
  SmallVectorImpl<std::pair<SID, GOTRelocations>>::iterator end = GOTs.end();

  for (it = GOTs.begin(); it != end; ++it) {
    GOTRelocations &GOTEntries = it->second;
    for (int i = 0, e = GOTEntries.size(); i != e; ++i) {
      if (GOTEntries[i].SymbolName != nullptr &&
          GOTEntries[i].SymbolName == Name) {
        GOTEntries[i].Offset = Addr;
      }
    }
  }
}

size_t RuntimeDyldELF::getGOTEntrySize() {
  // We don't use the GOT in all of these cases, but it's essentially free
  // to put them all here.
  size_t Result = 0;
  switch (Arch) {
  case Triple::x86_64:
  case Triple::aarch64:
  case Triple::aarch64_be:
  case Triple::ppc64:
  case Triple::ppc64le:
  case Triple::systemz:
    Result = sizeof(uint64_t);
    break;
  case Triple::x86:
  case Triple::arm:
  case Triple::thumb:
  case Triple::mips:
  case Triple::mipsel:
    Result = sizeof(uint32_t);
    break;
  default:
    llvm_unreachable("Unsupported CPU type!");
  }
  return Result;
}

uint64_t RuntimeDyldELF::findGOTEntry(uint64_t LoadAddress, uint64_t Offset) {

  const size_t GOTEntrySize = getGOTEntrySize();

  SmallVectorImpl<std::pair<SID, GOTRelocations>>::const_iterator it;
  SmallVectorImpl<std::pair<SID, GOTRelocations>>::const_iterator end =
      GOTs.end();

  int GOTIndex = -1;
  for (it = GOTs.begin(); it != end; ++it) {
    SID GOTSectionID = it->first;
    const GOTRelocations &GOTEntries = it->second;

    // Find the matching entry in our vector.
    uint64_t SymbolOffset = 0;
    for (int i = 0, e = GOTEntries.size(); i != e; ++i) {
      if (!GOTEntries[i].SymbolName) {
        if (getSectionLoadAddress(GOTEntries[i].SectionID) == LoadAddress &&
            GOTEntries[i].Offset == Offset) {
          GOTIndex = i;
          SymbolOffset = GOTEntries[i].Offset;
          break;
        }
      } else {
        // GOT entries for external symbols use the addend as the address when
        // the external symbol has been resolved.
        if (GOTEntries[i].Offset == LoadAddress) {
          GOTIndex = i;
          // Don't use the Addend here.  The relocation handler will use it.
          break;
        }
      }
    }

    if (GOTIndex != -1) {
      if (GOTEntrySize == sizeof(uint64_t)) {
        uint64_t *LocalGOTAddr = (uint64_t *)getSectionAddress(GOTSectionID);
        // Fill in this entry with the address of the symbol being referenced.
        LocalGOTAddr[GOTIndex] = LoadAddress + SymbolOffset;
      } else {
        uint32_t *LocalGOTAddr = (uint32_t *)getSectionAddress(GOTSectionID);
        // Fill in this entry with the address of the symbol being referenced.
        LocalGOTAddr[GOTIndex] = (uint32_t)(LoadAddress + SymbolOffset);
      }

      // Calculate the load address of this entry
      return getSectionLoadAddress(GOTSectionID) + (GOTIndex * GOTEntrySize);
    }
  }

  assert(GOTIndex != -1 && "Unable to find requested GOT entry.");
  return 0;
}

void RuntimeDyldELF::finalizeLoad(const ObjectFile &Obj,
                                  ObjSectionToIDMap &SectionMap) {
  // If necessary, allocate the global offset table
  if (MemMgr) {
    // Allocate the GOT if necessary
    size_t numGOTEntries = GOTEntries.size();
    if (numGOTEntries != 0) {
      // Allocate memory for the section
      unsigned SectionID = Sections.size();
      size_t TotalSize = numGOTEntries * getGOTEntrySize();
      uint8_t *Addr = MemMgr->allocateDataSection(TotalSize, getGOTEntrySize(),
                                                  SectionID, ".got", false);
      if (!Addr)
        report_fatal_error("Unable to allocate memory for GOT!");

      GOTs.push_back(std::make_pair(SectionID, GOTEntries));
      Sections.push_back(SectionEntry(".got", Addr, TotalSize, 0));
      // For now, initialize all GOT entries to zero.  We'll fill them in as
      // needed when GOT-based relocations are applied.
      memset(Addr, 0, TotalSize);
    }
  } else {
    report_fatal_error("Unable to allocate memory for GOT!");
  }

  // Look for and record the EH frame section.
  ObjSectionToIDMap::iterator i, e;
  for (i = SectionMap.begin(), e = SectionMap.end(); i != e; ++i) {
    const SectionRef &Section = i->first;
    StringRef Name;
    Section.getName(Name);
    if (Name == ".eh_frame") {
      UnregisteredEHFrameSections.push_back(i->second);
      break;
    }
  }
}

bool RuntimeDyldELF::isCompatibleFile(const object::ObjectFile &Obj) const {
  return Obj.isELF();
}

} // namespace llvm


text:
SINGLES / RECENT
Rohingya: Bangladesh
Rohingya: Myanmar
Myanmar's Transition
Sand Mining on Myanmar's Coast
In the Shadow of Letpadaung
Deported Mothers
Fighting Forest Fires
Myanmar Civil War
Burmese Boards
Who Lives
To Raise My Voice
24 Hour Gold
Veteran's Sanctuary
Editorial Portraits
30th Street Yangon
TRAVEL / FOOD
Shan State, Myanmar
Email: lauren.decicca@gmail.com Images © Lauren DeCicca 2015
On the outskirts of Yangon, Myanmar, in a shelter housing, is a rotating group of over 100 patients infected with HIV/AIDS.
The center, which has be been in operation since 2002, is owned and has been operated by the opposition party, the National League for Democracy, after the failure of the Myanmar government to take action and NGO's prevented from intervening.
In a country of 60 million, people nearly 189,000 adults suffer from HIV/AIDS with only 43 percent of those receiving the proper treatment.
This summer, Myanmar began receiving $160m from The Global Fund, in hopes of allowing the country to extend coverage to all who suffer from the illness. However, with the healthcare system ranked as the lowest of the 190 surveyed countries by the World Health Organization, Myanmar will likely struggle to provide necessary treatment.
It is vital that over the course of the next few years, as Myanmar develops; the fight against HIV/AIDS does not stagnate but becomes even more diligent.